package com.yuexun.dhdoctor.module.mythings.model.impl;



import com.yuexun.dhdoctor.module.mythings.api.ThingApi;
import com.yuexun.dhdoctor.module.mythings.bean.TaskData;
import com.yuexun.dhdoctor.module.mythings.model.IThingsMySelfModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/7/27.
 */
public class ThingsMySelfModel implements IThingsMySelfModel {
    private ThingApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public ThingApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(ThingApi.class);
        }
    }

    @Override
    public Observable<TaskData> getTaskDatas(Map<String, String> praise) {
        api = ApiInstance();
        return api.getTaskDatas(praise);
    }



}
